package tests;

import bookworm.BooksAndRatingOfOneAuthor;
import visitorpattern.CreatesVisitorsAndVisitsGraph;

public class BookReviewGraphConstructorAndVisitAverageAuthorTest 
{

	public static void main(String[] args) 
	{
		PrintTextInJFrame logWindow = new PrintTextInJFrame("log window for graph creation and visitor result");
		
		CreatesVisitorsAndVisitsGraph iteratesSameAuthor = new CreatesVisitorsAndVisitsGraph();
		logWindow.write("now getting average of books from author Sthephenie Meyer based on book reviews");
		BooksAndRatingOfOneAuthor booksAndRating = iteratesSameAuthor.getBooksAndAverageRatingOfSpecificAuthorBasedOnTag("Stephenie Meyer", "vampires");
		logWindow.write("this author is considered " + booksAndRating.getAverageRatingOfAuthorBasedOnTag() + " stars, based on the reviewers!");
	}

}
